package com.delayqueue.master.init;

import com.delayqueue.master.netty.handler.MasterServerBootstrap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class Init implements ApplicationRunner {

    @Autowired
    private MasterServerBootstrap masterServerBootstrap;

    @Override
    public void run(ApplicationArguments args) {

        log.info("开始系统初始化");
        masterServerBootstrap.init();
        log.info("系统初始化完毕");
    }
}
